home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 65.zip
/
BS1 part 65
/
Prof Draw 3.0 disk 1.adf
/
pdraw_rex.lzh
/
ADProHotLink.pdrx
< prev
next >
Wrap
Text File
|
1992-06-18
|
3KB
|
117 lines
/*
@N
This Genie sends a bitmap to Art Department Professional and reimport the bitmap when Art Department Professional quits.
*/
msg = PDSetup.rexx(2,0)
units = getclip(pds_units)
if msg ~= 1 then exit_msg(msg)
call setclip(pduser_adclip, "")
cr = '0a'x
options results
obj = pdm_ClickOnObj("Click on a bitmap")
if obj = 0 then exit_msg()
if ~isbitmap(obj) then exit_msg("You must click on a bitmap object")
bitmap = pdm_GetBitMapInfo(obj)
parse var bitmap width '0a'x height '0a'x ox '0a'x oy '0a'x xscale '0a'x yscale '0a'x angle '0a'x fname
screenmodes.1 = 8
screenmodes.1.1 = "Horizontal Overscan"
screenmodes.2 = 4
screenmodes.2.1 = "PAL"
screenmodes.3 = 1
screenmodes.3.1 = "HIRES"
screenmodes.4 = 2
screenmodes.4.1 = "Interlace"
screenmodes.5 = 16
screenmodes.5.1 = "Vertical Overscan"
screenmodes = ''
do i = 1 to 5
interpret compress(screenmodes.i.1) "=" screenmodes.i
screenmodes = screenmodes || '0a'x || screenmodes.i.1
end
screenmodes = substr(screenmodes, 2)
rendermodes = "2"cr"4"cr"8"cr"16"cr"32"cr"64"cr"128"cr"256"cr"AHAM"cr"ARZ0"cr"ARZ1"cr"CUST"cr"EHB"cr"HAM"
screenmode = pdm_SelectFromList("Select Screen Mode..", 25, 5, 1, screenmodes)
if screenmode = '' then exit_msg()
mode = 0
do while screenmode ~= ''
parse var screenmode val '0a'x screenmode
mode = mode + value(compress(val))
end
mode = substr(mode, 2)
rendermode = pdm_SelectFromList("Select Render Mode..", 25, 5, 0, rendermodes)
if rendermode = '' then exit_msg()
dimension = "Width:"width || cr"Height:"height
dimension = pdm_GetForm("Enter image dimensions", 8, dimension)
if dimension = '' then exit_msg()
parse var dimension iwidth '0a'x iheight
if ~(datatype(iwidth, n) & datatype(iheight, n)) then exit_msg("Invalid Entry")
address command
adargs = iwidth';'iheight';'rendermode';'fname';'mode
call setclip(ppuser_adargs, adargs)
adpro = 'ADPro:ADPro'
if ~exists(adpro) then
do
adpro = pdm_GetFileName("Please locate ADPro..", "","")
if adpro = '' then exit_msg()
end
"run >nil:" "rx rexx:PDADProComm.rexx "
if ~show(p, 'ADPro') then
do
/* this genie will go to sleep until adpro has quit */
address command
adpro ">nil:"
adclip = getclip(ppuser_adclip)
if adclip ~= "1" then exit_msg("Unable to start ADPro")
end
else
do
call pdm_Inform(1, "ADPro has already started. Click here when finished processing bitmap.",)
end
call pdm_PDrawToFront()
call pdm_ShowStatus("Reimporting BitMap..")
posn = pdm_GetObjVisPosn(obj)
call pdm_DeleteObj(obj)
bitmap = pdm_ImportBM(fname, word(posn, 1), word(posn, 2))
call pdm_SetBitMapInfo(bitmap, ox, oy, xscale, yscale, angle)
exit_msg()
exit_msg: procedure expose units
do
parse arg message
if message ~= '' then call pdm_Inform(1, message,)
call pdm_AutoUpdate(1)
call pdm_SetUnits(units)
call pdm_ClearStatus()
exit
end